<template>

<el-container>
  <el-header> 
      <div style="width: 1400px; margin: 0px auto">
    <div>
      合同信息
    </div>
  <el-menu
  :default-active="activeIndex"
  class="el-menu-demo"
  mode="horizontal"
  @select="handleSelect"
  background-color="#67C23A"
  text-color="#fff"
  active-text-color="#409EFF">
  <el-menu-item index="1" :underline="false">基本信息</el-menu-item>
   <el-menu-item index="2" >附件资料</el-menu-item>
    <el-menu-item index="3" >审批历史</el-menu-item>
     <!-- <el-menu-item index="4" >流程信息</el-menu-item> -->
  </el-menu>
  </div>
  </el-header>
  <el-main><router-view /></el-main>
</el-container>

 
 
</template>

<script>

export default ({
  data(){
    return {
        // bwid:'',
      activeIndex: '1',
activeName: 'first',
    }
  },
  created() {
    var bwid = this.$route.query.plid;
    console.log("bwidcon: "+plid);
   this.$router.push({path:"/detailed",query:{plid:this.$route.query.plid}});
  },
  methods:{
       handleSelect(key, keyPath) {
        if(key==1){
            console.log(key+":key")
console.log("hand:"+this.$route.query.plid)
this.$router.push({path:"/detailed",query:{plid:this.$route.query.plid}});
            
        }
        else if(key==2){
            console.log(key+":key")
            this.$router.push({path:"/file",query:{plid:this.$route.query.plid}});
        }else if(key==3){
            console.log(key+":key")
            this.$router.push({path:"/historyapproval",query:{plid:this.$route.query.plid}});
         }
         //else if(key==4){
        //     console.log(key+":key")
        //     this.$router.push({path:"/process",query:{bwid:this.$route.query.bwid}});
        // }
      },
   
    handleClick() {
        console.log(activeName);
      },
    // goBack() {
    //     this.$router.push("/borrowing")
    //     },
  },
  
})
</script>

<style>
</style>
